package com.evil.application.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 应用流程节点表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_application_process_node")
public class ApplicationProcessNode implements Serializable {

    /**
     * id
     */
    @TableId(value = "node_id", type = IdType.AUTO)
    private Long nodeId;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 流程id
     */
    @TableField(value = "process_id")
    private Long processId;

    /**
     * 节点类型(0: 开始节点, 1: 结束节点, 2: 网关节点, 3:审批节点, 4:填写节点, 5:抄送节点, )
     */
    @TableField(value = "node_type")
    private Integer nodeType;

    /**
     * 审批类型(node_type = 1 时有效；0: 或签, 1:会签)
     */
    @TableField(value = "approval_type")
    private Integer approvalType;

    /**
     * 节点名称
     */
    @TableField(value = "node_name")
    private String nodeName;

    /**
     * 上级节点
     */
    @TableField(value = "parent_node_id")
    private Long parentNodeId;

    /**
     * 是否开启重新触发数据关联或公式
     */
    @TableField(value = "recalculation")
    private Integer recalculation;

    /**
     * 重新触发数据关联或公式的控件id集合
     */
    @TableField(value = "recalculation_control_ids")
    private String recalculationControlIds;

    /**
     * 网关配置(node_type为0时值有效)
     */
    @TableField(value = "gateway_config")
    private String gatewayConfig;

    /**
     * 编号是否可见(0:否, 1:是)(作废)
     */
    @TableField(value = "visible_sn")
    private Integer visibleSn;

    /**
     * 申请人是否可见(0:否, 1:是)(作废)
     */
    @TableField(value = "visible_applicant")
    private Integer visibleApplicant;

    /**
     * 申请时间是否可见(0:否, 1:是)(作废)
     */
    @TableField(value = "visible_apply_date")
    private Integer visibleApplyDate;

    /**
     * 更新时间是否可见(0:否, 1:是)(作废)
     */
    @TableField(value = "visible_update_date")
    private Integer visibleUpdateDate;

    /**
     * 允许查看流程日志(0:否, 1:是)
     */
    @TableField(value = "process_log")
    private Integer processLog;

    /**
     * 处理反馈(0:否, 1:是)
     */
    @TableField(value = "handle_feedback")
    private Integer handleFeedback;

    /**
     * 流程超时处理(0:否, 1:是)
     */
    @TableField(value = "node_overtime")
    private Integer nodeOvertime;

    /**
     * 超时触发类型，0:自定义时间, 1:表单值
     */
    @TableField(value = "trigger_type")
    private Integer triggerType;

    /**
     * 超时触发表单控件id
     */
    @TableField(value = "trigger_field")
    private Long triggerField;

    /**
     * 超时条件
     */
    @TableField(value = "trigger_condition")
    private Integer triggerCondition;

    /**
     * 超时条件单位，0:天, 1:时, 2:分
     */
    @TableField(value = "trigger_condition_unit")
    private Integer triggerConditionUnit;

    /**
     * 超时自动提交，0: 关闭, 1: 开启
     */
    @TableField(value = "auto_submit")
    private Integer autoSubmit;

    /**
     * 超时提醒，0: 关闭, 1: 开启
     */
    @TableField(value = "overtime_remind")
    private Integer overtimeRemind;

    /**
     * 超时提醒条件
     */
    @TableField(value = "remind_condition")
    private Integer remindCondition;

    /**
     * 超时提醒条件单位，0:天, 1:时, 2:分
     */
    @TableField(value = "remind_condition_unit")
    private Integer remindConditionUnit;

    /**
     * 关联报表(0:否, 1:是)
     */
    @TableField(value = "relevancy_reporting")
    private Integer relevancyReporting;

    /**
     * 关联报表(0:可以查看全部关联报表, 1:限制关联报表可查看范围)
     */
    @TableField(value = "relevancy_type")
    private Integer relevancyType;

    /**
     * 开启节点提交重新更新字段关联数据(0:否, 1:是)
     */
    @TableField(value = "submit_refresh")
    private Integer submitRefresh;

    /**
     * 节点提交重新更新字段关联数据配置
     */
    @TableField(value = "submit_refresh_config")
    private String submitRefreshConfig;

    /**
     * 提交校验(0:否, 1:是)
     */
    @TableField(value = "submit_verification")
    private Integer submitVerification;

    /**
     * 待办转交(0:否, 1:是)
     */
    @TableField(value = "pending_divert")
    private Integer pendingDivert;

    /**
     * 待办转交类型(0:全部成员, 1:指定成员)
     */
    @TableField(value = "pending_divert_type")
    private Integer pendingDivertType;

    /**
     * 节点撤回(0:否, 1:是)
     */
    @TableField(value = "node_back")
    private Integer nodeBack;

    /**
     * 流程回退(0:否, 1:是)
     */
    @TableField(value = "node_fallback")
    private Integer nodeFallback;

    /**
     * 流程回退配置
     */
    @TableField(value = "node_fallback_config")
    private String nodeFallbackConfig;

    /**
     * 流程拒绝(0:否, 1:是)
     */
    @TableField(value = "node_refuse")
    private Integer nodeRefuse;

    /**
     * 流程可发起留言(0:否, 1:是)
     */
    @TableField(value = "node_message")
    private Integer nodeMessage;

    /**
     * 流程按钮配置
     */
    @TableField(value = "node_button_config")
    private String nodeButtonConfig;

    /**
     * 机器人配置
     */
    @TableField(value = "robot_config")
    private String robotConfig;

    /**
     * 源节点id
     */
    @TableField(value = "source_node_id")
    private Long sourceNodeId;

    /**
     * 是否已删除(0:否, 1:是)
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 修改操作人
     */
    @TableField(value = "modifier_id")
    private Long modifierId;

    /**
     * 修改操作人名字
     */
    @TableField(value = "modifier_name")
    private String modifierName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    @Serial
    private static final long serialVersionUID = 1L;

    public static final String COL_NODE_ID = "node_id";

    public static final String COL_PROCESS_ID = "process_id";

    public static final String COL_NODE_TYPE = "node_type";

    public static final String COL_APPROVAL_TYPE = "approval_type";

    public static final String COL_NODE_NAME = "node_name";

    public static final String COL_PARENT_NODE_ID = "parent_node_id";

    public static final String COL_RECALCULATION = "recalculation";

    public static final String COL_RECALCULATION_CONTROL_IDS = "recalculation_control_ids";

    public static final String COL_GATEWAY_CONFIG = "gateway_config";

    public static final String COL_VISIBLE_SN = "visible_sn";

    public static final String COL_VISIBLE_APPLICANT = "visible_applicant";

    public static final String COL_VISIBLE_APPLY_DATE = "visible_apply_date";

    public static final String COL_VISIBLE_UPDATE_DATE = "visible_update_date";

    public static final String COL_PROCESS_LOG = "process_log";

    public static final String COL_HANDLE_FEEDBACK = "handle_feedback";

    public static final String COL_NODE_OVERTIME = "node_overtime";

    public static final String COL_TRIGGER_TYPE = "trigger_type";

    public static final String COL_TRIGGER_FIELD = "trigger_field";

    public static final String COL_TRIGGER_CONDITION = "trigger_condition";

    public static final String COL_TRIGGER_CONDITION_UNIT = "trigger_condition_unit";

    public static final String COL_AUTO_SUBMIT = "auto_submit";

    public static final String COL_OVERTIME_REMIND = "overtime_remind";

    public static final String COL_REMIND_CONDITION = "remind_condition";

    public static final String COL_REMIND_CONDITION_UNIT = "remind_condition_unit";

    public static final String COL_RELEVANCY_REPORTING = "relevancy_reporting";

    public static final String COL_RELEVANCY_TYPE = "relevancy_type";

    public static final String COL_SUBMIT_REFRESH = "submit_refresh";

    public static final String COL_SUBMIT_REFRESH_CONFIG = "submit_refresh_config";

    public static final String COL_SUBMIT_VERIFICATION = "submit_verification";

    public static final String COL_PENDING_DIVERT = "pending_divert";

    public static final String COL_PENDING_DIVERT_TYPE = "pending_divert_type";

    public static final String COL_NODE_BACK = "node_back";

    public static final String COL_NODE_FALLBACK = "node_fallback";

    public static final String COL_NODE_FALLBACK_CONFIG = "node_fallback_config";

    public static final String COL_NODE_REFUSE = "node_refuse";

    public static final String COL_NODE_MESSAGE = "node_message";

    public static final String COL_NODE_BUTTON_CONFIG = "node_button_config";

    public static final String COL_ROBOT_CONFIG = "robot_config";

    public static final String COL_SOURCE_NODE_ID = "source_node_id";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_MODIFIER_ID = "modifier_id";

    public static final String COL_MODIFIER_NAME = "modifier_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}